package com.dys.service.impl;

import com.dys.dao.CpMapper;
import com.dys.service.CpService;
import com.dys.util.Cp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("cpService")
public class CpServiceImpl implements CpService {

    @Autowired
    CpMapper cpMapper;

    @Override
    public List<Cp> getAllCp() {
        return cpMapper.getAllCp();
    }

    @Override
    public List<Cp> getDelCp() {
        return cpMapper.getDelCp();
    }

    @Override
    public int cpAdd(Cp cp) {
        return cpMapper.cpAdd(cp);
    }

    @Override
    public int cpUpdate2(Cp cp) {
        return cpMapper.cpUpdate2(cp);
    }

    @Override
    public Cp getCpById(int id) {
        return cpMapper.getCpById(id);
    }

    @Override
    public int cpDelete(int id) {
        return cpMapper.cpDelete(id);
    }

    @Override
    public int cpRelDel(int id) {
        return cpMapper.cpRelDel(id);
    }

    @Override
    public int reBackCp(int id) {
        return cpMapper.reBackCp(id);
    }

//    @Override
//    public int cpPicInsert (String picAddress,int id) {
//         return cpMapper.cpPicInsert(picAddress,id);
//    }

}
